package com.meilai.project.util;

import com.meilai.project.vo.system.UserVO;

/**
 * 公司用户
 */
public class ThreadLocalUserUtil {
    private static class SingletonHolder {
        private static final ThreadLocal<UserVO> INSTANCE = new ThreadLocal<UserVO>();
    }

    private ThreadLocalUserUtil(){}

    public static final ThreadLocal<UserVO> getInstance() {
        return SingletonHolder.INSTANCE;
    }

    public static UserVO get() {
        return SingletonHolder.INSTANCE.get();
    }

    public static void set(UserVO obj) {
        SingletonHolder.INSTANCE.set(obj);
    }

    public static void remove() {
        SingletonHolder.INSTANCE.remove();
    }
}
